package ch.trackedbean.data.evaluator;

import ch.trackedbean.common.*;
import ch.trackedbean.copier.*;
import ch.trackedbean.data.*;

/**
 * Evaluator from Dom to TO classes.
 * 
 * @author M. Hautle
 */
public class DomEvaluator implements ITypeEvaluator {
	/**
	 * {@inheritDoc}
	 */
	@Override
	public Class<?> getCorrespondingType(Object src) throws TechnicalException {
		final Class<? extends Object> type = src.getClass();
		if (DomD.class.isAssignableFrom(type))
			return TOD.class;
		if (DomB.class.isAssignableFrom(type))
			return TOBC.class;
		if (DomC.class.isAssignableFrom(type))
			return TOBC.class;
		return TOA.class;
	}
}
